package com.jadesoft.ciadapter.library;

public class Css extends Queue<String> {
	public void enqueue(String obj){
		if (this.indexOf(obj) == -1){
			super.enqueue(obj);
		}
	}
	public String export(){
		StringBuffer buffer = new StringBuffer();
		while ( ! this.isEmpty()){
			String href = this.dequeue();
			if ( ! href.startsWith("/") ){
				href  = "/css/"+href;
			}
			buffer.append("<link href=\"")
				  .append(href)
				  .append(".css\" rel=\"stylesheet\" type=\"text/css\"/>");
		}
		return buffer.toString() ;
	}
}
